package com.platform.qujia.controller;

import com.platform.qujia.service.GzhNewsTemplateService;
import com.platform.qujia.service.IReceiptSectionService;
import com.platform.qujia.utils.ResultData;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2024/2/19
 */
@RestController
@RequestMapping("receiptSection")
@Api(tags = "小票打印设置")
public class ReceiptSectionController {

    @Autowired
    private IReceiptSectionService receiptSectionService;
    @Autowired
    private GzhNewsTemplateService gzhNewsTemplateService;

    @RequestMapping("getOrderReceiptString")
    public ResultData<String> getOrderReceiptString(@RequestParam("orderNo") String orderNo,
                                                    @RequestParam("deviceFactory") String deviceFactory,
                                                    @RequestParam("printType") String printType,
                                                    @RequestParam("his") boolean his){
        return ResultData.success(gzhNewsTemplateService.getOrderReceiptString(orderNo, deviceFactory, printType, his));
    }

}
